package com.ck.mybatis.plus.conf;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Classname MybatisPlusConfig
 * @Description MybatisPlus配置
 * @Date 2020/7/11 14:20
 * @Created by lpc
 */
@EnableTransactionManagement
@Configuration
@MapperScan({"com.ck.mybatis.plus.mapper.**"})
public class MybatisPlusConfig {

    public MybatisPlusConfig() {
    }

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }

}
